package day12;

import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        char[]str=in.nextLine().toCharArray();
        String s= in.nextLine();
        boolean[]p=new boolean[300];
        for (int i = 0; i <s.length() ; i++) {
            p[s.charAt(i)]=true;
        }
        for (int i = 0; i < str.length ; i++) {
            if(!p[str[i]]){
                System.out.print(str[i]);
            }
        }
    }
}
